import {
  get,
  put,
  _delete,
  post
} from '@/lin/plugin/axios'
class Info{
  static async getByState(state, page, count) {
    const res = await get(`recruit/info/page/${state}`, {
      page: page,
      count: count
    })
    return res
  }

  static async getById(id) {
    const res = await get(`recruit/info/${id}`)
    return res
  }

  static async delete(id) {
    const res = await _delete(`recruit/info/${id}`)
    return res
  }

  static async update(id, data) {
    const res = await put(`recruit/info/${id}`, data)
    return res
  }

  static async create(data) {
    const res = await post(`recruit/info`, data)
    return res
  }
  static async pages(state) {
    const res = await get(`recruit/info/page/${state}`)
    return res
  }
}

export {
  Info
}
